gdk: Redo key events
authorMatthias Clasen <mclasen@redhat.com>
Sun, 5 Apr 2020 18:40:55 +0000 (14:40 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 6 Apr 2020 19:13:54 +0000 (15:13 -0400)
commit0a96a483c696d6620a6e08ff97cebc0f5b90ac47
treef7beb2a7fa97e3d4d9ff509111ab9eb563240f8b
parent50713677942b7917af52ce4bc5aa3cb8f8cd9528
gdk: Redo key events

Add all of the keyboard translation results in the key event,
so we can translate the keyboard state at the time the event
is created, and avoid doing state translation at match time.

We actually need to carry two sets of translation results,
since we ignore CapsLock when matching accelerators, in
gdk_event_matches().

At the same time, drop the scancode field - it is only ever
set on win32, and is basically unused in GTK.

Update all callers.
19 files changed:
docs/reference/gdk/gdk4-sections.txt
gdk/broadway/gdkeventsource.c
gdk/gdkevents.c
gdk/gdkevents.h
gdk/gdkeventsprivate.h
gdk/gdksurface.c
gdk/wayland/gdkdevice-wayland.c
gdk/wayland/gdkkeys-wayland.c
gdk/wayland/gdkprivate-wayland.h
gdk/win32/gdkevents-win32.c
gdk/x11/gdkdevicemanager-xi2.c
gdk/x11/gdkdrag-x11.c
gtk/gtkcellrendereraccel.c
gtk/gtkeventcontrollerkey.c
gtk/gtkimcontextsimple.c
gtk/gtkshortcutcontroller.c
gtk/gtkshortcuttrigger.c
gtk/gtkshortcuttrigger.h
testsuite/gtk/shortcuts.c